package com.bestv.search.common.dao;

import com.bestv.search.common.model.Person;
import com.bestv.search.common.model.PersonExtend;
import com.bestv.search.common.model.PersonProduct;

import java.util.Date;
import java.util.List;

public interface PersonDao extends GenericDao<Person, Long> {

    List<String> getAllName(int start, int limit);

    int getCount();

    void saveProductInfoReference(String personProductId, long info_id);

    boolean existProductInfoReference(String personProductId, long info_id);

    List<String> getPersonIdByInfoId(long info_id);

    List<PersonExtend> getPersonByUpdateTime(Date updateTime, int start, int limit);

    PersonExtend getPersonById(String personId);

    int getPersonCountByUpdateTime(Date updateTime);

    List<PersonProduct> getPersonProductsByPersonId(String personId);

    void updateAvatar(String personId, byte[] avatar);

    List<PersonExtend> getPersonByName(String name, String[] nationalityArray, int start, int limit);

    int getPersonCountByName(String name, String[] nationalityArray);
}